<?php

namespace GamesBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @author  coffey  <coffey@nligo.com>
 * GamesComplain
 *
 * 游戏投诉建议表
 * @ORM\Table(name="games_complain")
 * @ORM\Entity(repositoryClass="GamesBundle\Repository\GamesComplainRepository")
 * @ORM\HasLifecycleCallbacks()
 */
class GamesComplain
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false,options={"comment":"反馈建议自增id"})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="User")
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     */
    private $userId;


    /**
     * @var integer
     *
     * @ORM\Column(name="status", type="integer", nullable=false,options={"comment":"处理状态 0为默认提交审核中 1为已处理 默认为0"})
     */
    private $status = '0';

    /**
     * @var integer
     *
     * @ORM\Column(name="is_del", type="integer", nullable=false,options={"comment":"是否删除 0为正常 1为删除"})
     */
    private $isDel = '0';

    /**
     * @var string
     *
     * @ORM\Column(name="complain_desc", type="string", length=255, nullable=false,options={"comment":"建议描述"})
     */
    private $complainDesc = '';

    /**
     * @var integer
     *
     * @ORM\Column(name="create_at", type="integer", nullable=false,options={"comment":"创建时间"})
     */
    private $createAt = '0';

    /**
     * @var integer
     *
     * @ORM\Column(name="deal_at", type="integer", nullable=false,options={"comment":"处理时间"})
     */
    private $dealAt = '0';

    /**
     * @ORM\PrePersist
     */
    public function PrePersist(){
        $this->setCreateAt(time());
        $this->setDealAt(time());
    }

    /**
     * @ORM\PreUpdate
     */
    public function PreUpdate(){
        $this->setDealAt(time());
    }


    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set status
     *
     * @param integer $status
     *
     * @return GamesComplain
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }

    /**
     * Get status
     *
     * @return integer
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Set isDel
     *
     * @param integer $isDel
     *
     * @return GamesComplain
     */
    public function setIsDel($isDel)
    {
        $this->isDel = $isDel;

        return $this;
    }

    /**
     * Get isDel
     *
     * @return integer
     */
    public function getIsDel()
    {
        return $this->isDel;
    }

    /**
     * Set complainDesc
     *
     * @param string $complainDesc
     *
     * @return GamesComplain
     */
    public function setComplainDesc($complainDesc)
    {
        $this->complainDesc = $complainDesc;

        return $this;
    }

    /**
     * Get complainDesc
     *
     * @return string
     */
    public function getComplainDesc()
    {
        return $this->complainDesc;
    }

    /**
     * Set createAt
     *
     * @param integer $createAt
     *
     * @return GamesComplain
     */
    public function setCreateAt($createAt)
    {
        $this->createAt = $createAt;

        return $this;
    }

    /**
     * Get createAt
     *
     * @return integer
     */
    public function getCreateAt()
    {
        return $this->createAt;
    }

    /**
     * Set dealAt
     *
     * @param integer $dealAt
     *
     * @return GamesComplain
     */
    public function setDealAt($dealAt)
    {
        $this->dealAt = $dealAt;

        return $this;
    }

    /**
     * Get dealAt
     *
     * @return integer
     */
    public function getDealAt()
    {
        return $this->dealAt;
    }

    /**
     * Set userId
     *
     * @param \GamesBundle\Entity\User $userId
     *
     * @return GamesComplain
     */
    public function setUserId(\GamesBundle\Entity\User $userId = null)
    {
        $this->userId = $userId;

        return $this;
    }

    /**
     * Get userId
     *
     * @return \GamesBundle\Entity\User
     */
    public function getUserId()
    {
        return $this->userId;
    }
}
